package per.turtle.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import per.turtle.common.core.web.entity.Query;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author turtle
 */
@Schema(name = "SysOperLog", description = "操作日志记录")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_oper_log")
public class SysOperLog extends Query {

    private static final long serialVersionUID = 1L;

    @Schema(description = "日志主键")
    @TableId(type = IdType.AUTO)
    private Long operId;

    @Schema(description = "操作模块")
    private String title;

    @Schema(description = "业务类型（详见数据字典）")
    private Integer businessType;

    @Schema(description = "业务类型数组")
    @TableField(exist = false)
    private List<Integer> businessTypes;

    @Schema(description = "请求方法")
    private String method;

    @Schema(description = "请求方式")
    private String requestMethod;

    @Schema(description = "操作类别（0：其它；1：后台用户；2：手机端用户）")
    private Integer operatorType;

    @Schema(description = "操作人员")
    private String operName;

    @Schema(description = "部门名称")
    private String deptName;

    @Schema(description = "请求url")
    private String operUrl;

    @Schema(description = "操作地址")
    private String operIp;

    @Schema(description = "请求参数")
    private String operParam;

    @Schema(description = "返回参数")
    private String jsonResult;

    @Schema(description = "操作成功（0：否；1：是）")
    private Boolean isSuccess;

    @Schema(description = "错误消息")
    private String errorMsg;

    @Schema(description = "操作时间")
    private LocalDateTime operTime;

}
